<template>
	<view class="bg-gray">
		<view class="wrapper width">
			<carousel :res="carouselImage" class="bgshare" height='340' />
			<view class="main">
				<list :bg='bgimg' :list="courseList" title='课程名称' price='0' url='/pages/study/studydetail'></list>
				<view class="apply">
					<u-button type="primary" shape='circle'  @click="jump('/pages/study/addresslist')">活动场地申请</u-button>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
import tpl_banner from "@/pages/tabbar/roperty/template/tpl_banner"; //导航栏模块
import storage from "@/utils/storage.js"; //缓存
import list from "@/components/huashuiwan/list.vue";
import { getLxyCourse } from "@/api/course";
export default {
	data() { 
		return {
			bgimg:'https://www.haopengsong.xyz/static/study/navbg.png',
			carouselImage:[
				//{ name:'https://www.haopengsong.xyz/static/study/bg.png'}
				{ name:"https://www.haopengsong.xyz/static/study.png"}
			],
			courseList:[]
		};
	},
	components: {
		carousel: tpl_banner,
		list
	},
	/**
	 * 页面加载
	 */
	onLoad(options) {
		this.getList()
	},
	/**
	 * 页面显示
	 */
	onShow() {
		
	},
	/**
	 * 触底事件
	 */
	onReachBottom() {
		
	},
	/**
	 * 下拉刷新
	 */
	onPullDownRefresh() {
		
	},
	/**
	 * 页面滚动
	 * @param {Object} e
	 */
	onPageScroll(e) {
		
	},
	mounted() {
		
	},
	methods: {
		jump(res){
			uni.navigateTo({
				url: res
			});
		},
		/** 桌号列表 **/
		getList(){
			getLxyCourse().then(res=>{
				this.courseList = res
			})
		},
	}
};
</script>

<style lang="scss" scoped>
/**去除scroll-view的滚动条*/
::-webkit-scrollbar {
	display: none;
	width: 0 !important;
	height: 0 !important;
	-webkit-appearance: none;
	background: transparent;
}
.main{
	padding-bottom: 20px;
	margin-top: 20px;
	.apply{
		margin-top: 20px;
	}
}
</style>